ERL=erl -pa ./ebin 
CP=cp
RM=rm
APP_NAME=bbc2daap
VSN=0.1.0

all:
	$(ERL) -make
	$(CP) src/*.app ebin/

boot:
	$(ERL) -eval 'systools:make_script("bbc2daap_$(VSN)", [local, {outdir, "."}, {path,["ebin","priv"]}]), init:stop().' -noshell

clean:
	$(RM) -fv *.boot
	$(RM) -fv *.script
	$(RM) -fv ebin/*.beam
	$(RM) -fv erl_crash.dump
	$(RM) -fv ebin/*.app

#dist:
#	$(ERL) -eval 'systools:make_script("bbc2daap", [{outdir, "dist"}, {path,["ebin","priv"]}]), init:stop().' -noshell
#	$(ERL) -eval 'systools:make_tar("bbc2daap", [{path, "priv"}, {dirs, [doc,include]}, {erts, code:root_dir()}]), init:stop().' -noshell

run:
	$(ERL) -smp auto \
	-boot bbc2daap_$(VSN)
